package consumer;

public class Phone {
	private static int autoId;
	private String name;
	private int phoneId;
	public Phone(String name) {
		super();
		this.name = name;
		synchronized (Phone.class) {
			this.phoneId = ++autoId;
		}
	}
	public int getPhoneId() {
		return phoneId;
	}
	public void setPhoneId(int phoneId) {
		this.phoneId = phoneId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
}
